This invention relates to the representation of digital images, particularly the representation of those digital images in compressed format. The invention is also related to the representation of digital images in multiple planes of like, similar, or related data traits or values. The invention is more particularly related to the optimization of a plane of a digital image for a selected compression methodology and for storing correction data for the optimized plane in an alternate plane of the image. The invention is also related to the reconstruction of a representation of a digital image by selecting data from either an optimized plane of a representation of the digital image and an additive plane comprising additive data from each of the optimized plane and a correction plane.
The efficient transmission, exchange, and storage of image data is a key issue in distributed systems. The main difficulty is to find effective ways of significantly reducing the large amount of information that needs to be transferred and/or processed, while still being able to reconstruct the image with good fidelity. The conventional approach to deal with this problem is to reduce the amount of data by applying compression. Several compression technique (such as LZW, JPEG, JBIG, and Wavelets) have been developed over the years to effectively handle the various types of data often found in digital documents. For example, binary compression schemes such as LZW are very effective in dealing with text and line-art information, while JPEG has been successfully developed to encode natural photographs. However, these algorithms have been designed to perform well on a particular class (be it textual or pictorial) of images—and no single algorithm can possibly handle all types of image classes reasonably well.
One approach to achieve high compression ratio is to divide the underlying document by image class, and apply the most appropriate compression technique on each class separately. Text and line-art information would be compressed using an approach that focuses on maintaining the detailed structure (edge information), while pictures and color sweeps would be compressed using an approach that opts for preserving the color depth and smoothness.
The Document Image Representation (DIR) is one way of describing digital documents based on this concept. According to the DIR draft specification (Rev. 1.1 dated Aug. 26, 1996), the current DIR model is represented using three different (logical) planes, as shown in FIG. 1: An upper plane Up, also referred to as the foreground plane, typically containing data that puts high requirements on detail such as text and line-art; A purely binary selector plane Sp, or mask plane, that provides switching information between the upper and lower planes; And a lower plane Lp, also referred to as the background plane, that emphasizes color gradation, such as images and sweeps. Note that the contents of the planes in FIG. 1 is shown just for the purpose of illustration. One could, for example, represent the same image in FIG. 1 (colored text surrounding a picture) by having binary (black) text in the selector plane, and filling the upper plane with the color of the text everywhere. Other variations are also possible.
The embedded imaging model within DIR will be referred to as the Selective Model, since content of the upper plane is used to overwrite the content of the lower plane, on a pixel by pixel basis, whenever the selector plane is true. In other words, the upper plane data is “poured” through the binary selector plane, to replace the lower plane data below. Note that at the end, each reconstructed pixel carries information from either the upper or lower planes. That is, the information present in the other plane (the one not selected by the mask) is considered irrelevant and is ignored.
Adobe Systems, Inc., is currently considering to incorporate a new Masked Image Operator as an extension to Postscript Level III and PDF that could enable DIR reconstruction from a logical multi-planar representation. The new operator can “mask” out the background, leaving a foreground object visible, without having to define a clipping path. The resulting image can then be “placed over” (e.g., overwrite) another background. Hence the Masked Image Operator shares the same property as the embedded imaging model proposed in the DIR specification: they both share the notion of “pouring” the foreground through the mask, and overwriting the data below.
Typically, in each of the DIR and Adobe methods, the upper and lower planes are usually compressed using very different compression schemes. The DIR specification recommends, as an example, use of the following algorithms (DIR spec, pp. 8): Fiala-Green (LZW related) for text and line-art (Upper plane), CCITT group 3/4 for the binary mask (Selector plane), and JPEG for color images and sweeps (Lower plane). Hence with the Selective Model, one is forced to pick, per pixel, one compression scheme at all times and is prevented from using a clever combination of both. Even if one could potentially decide on how to separate the information between planes, such decision may inevitably lead to loss of image quality, or alternatively, to comparable reduction in compression. For example, true line-art will not retain a good edge definition when passed through JPEG, unless the compression requirements were greatly relaxed. Similarly, LZW will fail to produce good compression results when applied to noisy photographs.
The present inventors have realized that a decision to enforce one of the planes at all times limits the flexibility of a representation model.
Accordingly, it is an object of the present invention to provide an image compressor and a method of image compression/representation that varies an amount of detail contained in any of plural image planes representing an image.
It is another object of the present invention to optimize at least one of the plural image planes for compression using a selected compression methodology by varying an amount of image detail maintained in each of the image planes.
It is yet another object of the present invention to determine an amount of image detail in each of the image planes based on at least one of a super-resolution, a fine edge positioning pixels of a selected image plane, and an average color of the selected image plane.
It is still yet another object of the present invention to provide an image decompressor and a method of image decompression that reconstructs an image from plural image planes, including an upper plane and an additive plane that is constructed from image information contained in both the upper plane and an alternate plane the plural image planes.
These and other objects are accomplished by a method of decompressing an image, including the steps of decompressing an upper plane of an image, decompressing a lower plane of an image, adding the decompressed upper plane and the decompressed lower plane to produce an additive image, and selecting pixels of a final decompressed image from one of the decompressed lower plane and the additive image. The step of selecting pixels may include the step of varying an amount of the additive image produced by the upper plane based on a predetermined factor.
In addition, the above objects may be accomplished via a compression apparatus, including means for compressing an upper plane of an image and a lower plane of an image, wherein an amount of detail of the image contained in pixels of the compressed upper plane increases with respect to a predetermined factor of corresponding pixels in the image. In alternate embodiments, the predetermined factor may be one of a degree of color in the corresponding pixels matching a background color of the image and an amount of fine edge positions in the corresponding pixels.
The Document Image Representation (DIR) specification provides a way of describing digital documents by separating textual (line-art) information from continuous-tone pictures and applying different compression on each component, to take advantage of its specific attributes. However, the imbedded imaging model (a Selective Model) as implied by the DIR is limiting: the information must always be classified and strictly carried in one of two channels, but never in both.
The present invention improves and further enhances the existing DIR representation to eliminate the above discussed limitations. Specifically it offers to replace the Selective Imaging Model with an Additive Imaging Model, thereby allowing the flexibility to combine information from both channels to make the best use of available compression resources. In addition, it offers to optionally extend the selector plane beyond binary. These modifications define a new and more flexible method of representing digital documents, that may lead to substantial improvements both in quality and compression results when compared with the existing method. The improvements are demonstrated in a case study example discussed hereinbelow.